home *** CD-ROM | disk | FTP | other *** search
/ BBS Toolkit / BBS Toolkit.iso / doors_2 / tridv220.zip / TRIDOOR.DOC < prev    next >
Text File  |  1992-02-18  |  46KB  |  1,217 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.                        T R I U M P H   S O F T W A R E
  13.  
  14.  
  15.                                   Presents
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.            ░██████████        ░██   ░███████
  23.            ░█  ░██  ░█               ░██  ░██
  24.                ░██     ░█░██  ░██    ░██  ░██  ░███   ░███  ░█░██
  25.                ░██      ░█ ░█  ░█    ░██  ░██ ░█  ░█ ░█  ░█  ░█ ░█
  26.               ░████    ░██    ░███  ░███████   ░███   ░███  ░██
  27.  
  28.  
  29.  
  30.  
  31.                           An On-Line Door Support Unit
  32.                       For use with Turbo Pascal 5.5 and 6.0
  33.  
  34.  
  35.  
  36.  
  37.  
  38.                     TriDoor Written by Christopher M. Russo
  39.            TriComm Communications Support Written by Jeremy H. DuBois
  40.  
  41.          TriDoor, TriComm (c)1992 Triumph Software, All Rights Reserved.
  42.  
  43.  
  44.  
  45.  
  46.  
  47.            QuickBBS is a Registered Trademark of the QuickBBS Group.
  48.             Turbo Pascal is a Registered Trademark of Borland, Inc.
  49.  
  50.  
  51.  
  52.               Triumph Software is not affiliated in any way with
  53.                  either The QuickBBS Group or Borland, Inc.
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61. Triumph Software - TriDoor Documentation                                  pg. i
  62.  
  63.  
  64.  
  65.  
  66.  
  67.                                  DISCLAIMER
  68.  
  69.  
  70.      Triumph Software and  the  employees/programmers  in  conjunction with
  71.   and/or affiliated  with Triumph Software  can  not  be  held  responsible
  72.   for  the  condition  of any  software  received  through any  non-postal/
  73.   non-parcel means.  
  74.  
  75.      Nor  can  said persons  be held  responsible for  any damage caused to
  76.   media or hardware as a result of the use of any of our products.
  77.  
  78.      Triumph Software and  it's employees and  associates would like  it to
  79.   be known,  however, that  all of  their  products are  thoroughly  tested
  80.   before  leaving  our  offices.  It  is  only  in the deepest faith in our
  81.   own product that any such software is released to the public.
  82.  
  83.      Triumph  Software reserves  the right  to  change  any  documentation,
  84.   disclaimer,  licensing information  or registration  procedures and costs
  85.   at any time for any reason with no prior warning or notice.
  86.  
  87.  
  88.  
  89. Triumph Software - TriDoor Documentation                                pg. ii
  90.  
  91.  
  92.  
  93.  
  94.  
  95.                          LIMITED LICENSING AGREEMENT
  96.  
  97.  
  98.      The holder of  the  unregistered TriDoor package  is allowed a limited
  99.    usage period of 30 (thirty)  days,  wherein  he  or she  may incorporate
  100.    the unit  in any program  that he or she develops as long as the program 
  101.    incorporating the  TriDoor unit is not distributed  in any manner at any 
  102.    time.  After  the thirty day period, the holder of the unregistered copy
  103.    of the TriDoor  package must register the software to be allowed further
  104.    use of TriDoor.
  105.  
  106.      A private registered  copy may be obtained by filling  out the TriDoor
  107.    registration form and sending both the registration form and  $30.00, in
  108.    the form  of a  check or  money order, to Triumph Software.  The private
  109.    copy will  allow the registered  owner  to produce  programs  using  the
  110.    TriDoor  unit  and  distribute  them  as long as  the registered copy of
  111.    TriDoor  is  not  included  in  the  the  package,  no  compensation  is
  112.    obtained in any way from the distribution of the  software incorporating
  113.    the TriDoor unit, and Triumph Software is given ample credit as depicted
  114.    in the  final chapter  of  this document.  The  registered  copy  of the
  115.    TriDoor unit must not be distributed in any way other than as a compiled
  116.    portion of a program or software produced by the registered copy holder.
  117.  
  118.      A  commercial  registered  copy  may  be  obtained  by filling out the
  119.    TriDoor  registration  form and sending  both the registration  form and
  120.    $100.00, in the form of  check or  money order, to Triumph Software. The
  121.    commercial copy  will allow  the registered  owner  to  produce programs
  122.    using the TriDoor unit and distribute them.  This  copy  also allows the
  123.    holder of  the  registered  copy to  obtain legal  compensation  for the
  124.    program incorporating the TriDoor package.  The holder of the commercial
  125.    registered  copy  must include  acceptable credit  in  the documentation
  126.    of his or  her  program as  further  explained  in  the final chapter of
  127.    this document.  The  registered copy  of the  TriDoor unit  must  not be
  128.    distributed in any way other than as a compiled  portion of a program or
  129.    software produced by the registered copy holder.
  130.  
  131.      An individual copy must be registered for each  individual company and
  132.    person.  The  only exception  is in  the case  of a  company  owned by a
  133.    person in  which case the copy may be registered for both in the case of
  134.    a commercial copy.
  135.  
  136.      Triumph Software reserves the right to  revoke registration priviliges
  137.    either temporarily  or permanently if the conditions of the registration
  138.    are not properly met by the holder of the registered TriDoor package.
  139.  
  140.      Triumph Software reserves the right to use the registered owners name,
  141.    company and/or product  created incorporating the TriDoor unit in any of
  142.    Triumph Software's advertising of any type.
  143.  
  144.      Registered  copy holders  will be  entitled to  minor  upgrades of the
  145.    TriDoor package at a minimal processing  and materials fee  of $5.00 per
  146.    upgrade.  Major upgrades can be obtained at a cost of $12.00 for private
  147.    copies and $24.00 for commercial copies.
  148.  
  149.  
  150.  
  151.  
  152. Triumph Software - TriDoor Documentation                                pg. iii
  153.  
  154.  
  155.  
  156.  
  157.  
  158.                               TABLE OF CONTENTS
  159.  
  160.  
  161.      Why Use Tridoor?. . . . . . . . . . . . . . . . . . . . . . . . .001
  162.  
  163.      Features of TriDoor . . . . . . . . . . . . . . . . . . . . . . .002
  164.  
  165.      What's New This Version . . . . . . . . . . . . . . . . . . . . .003
  166.  
  167.      Command Summary . . . . . . . . . . . . . . . . . . . . . . . . .004
  168.  
  169.      Accessible Variables. . . . . . . . . . . . . . . . . . . . . . .010
  170.  
  171.      Incoporating Support for Other BBS Software . . . . . . . . . . .011
  172.  
  173.      Programming With TriDoor. . . . . . . . . . . . . . . . . . . . .013
  174.  
  175.      Reserved Words. . . . . . . . . . . . . . . . . . . . . . . . . .014
  176.  
  177.      Tested Limits of TriDoor. . . . . . . . . . . . . . . . . . . . .015
  178.  
  179.      Programming Hint(s) . . . . . . . . . . . . . . . . . . . . . . .016
  180.  
  181.      Things to Come ("The Workbench"). . . . . . . . . . . . . . . . .017
  182.  
  183.      Who to Contact. . . . . . . . . . . . . . . . . . . . . . . . . .018
  184.  
  185.      History of TriDoor. . . . . . . . . . . . . . . . . . . . . . . .019
  186.  
  187.      Other Products by Triumph Software. . . . . . . . . . . . . . . .020
  188.  
  189.      A Comment on Quality. . . . . . . . . . . . . . . . . . . . . . .021
  190.  
  191.      Acceptable Credit in Programs and Documentation . . . . . . . . .022
  192.  
  193.  
  194.  
  195. Triumph Software - TriDoor Documentation                                pg. 001
  196.  
  197.  
  198.  
  199.  
  200.  
  201.                               WHY USE TRIDOOR?
  202.  
  203.  
  204.      The TriDoor communications package provides the programmer with a list
  205.    of many commands and features that I have found extremely useful, if not
  206.    invaluable while  writing  various on-line  doors  for  both  my BBS and 
  207.    others.
  208.  
  209.      No longer is the value of any door program you write hinging upon your
  210.    abilities  to write the  communications drivers and  commands to support 
  211.    them!  Now, with communications equivalents of standard Pascal commands,
  212.    such  as  print()  which  almost  mirrors  Turbo  Pascal's  write()  and
  213.    writeln(), you can sit at your terminal and write  any program for a BBS
  214.    in the same amount of  time and with  the same amount of effort it would
  215.    take to write one for local usage!
  216.  
  217.      The  possibilities are endless- I have written  on-line games, archive
  218.    viewing utilities, text/ansi  file viewers, "top-ten" user-list creators
  219.    and  many more.
  220.  
  221.      How many times have you said to yourself, "Wow, this is a great system
  222.    I  have here, if only  I  could add..." One solution: you can go out and 
  223.    download programs to do some of the  things you  need to do; but none of
  224.    them  are  ever exactly  what  you want, and  you have to pay all  those  
  225.    shareware fees.  What  do you  do about all the things that you couldn't
  226.    find anywhere? Hire an expensive programmer?
  227.  
  228.      I  frequently find myself saying "If you can't do it with TriDoor, YOU 
  229.    CAN'T DO IT!"  It  is the  easiest  way to  create  a  door. This is the 
  230.    best software  package available  of this kind.  It's  easy,  quick, and 
  231.    powerful and you  hold the  power  to make the  doors  and on-line games
  232.    that  you have always wanted!
  233.  
  234.      
  235.  
  236.  
  237. Triumph Software - TriDoor Documentation                                pg. 002
  238.  
  239.  
  240.  
  241.  
  242.  
  243.                              FEATURES OF TRIDOOR
  244.  
  245.  
  246.      TriDoor  has many advanced,  easy to use  features and I intend to add
  247.    more.  Any  additional features will  be tacked on to the actual program 
  248.    commands  explanations with  their appropriate version numbers.
  249.  
  250.         * Automatic set-up and support of communications ports.
  251.         * Automatic reading and processing of the file DORINFO1.DEF.
  252.         * Easy to use commands such as PRINT and GETINPUT which will 
  253.           print to the local screen, and the comport if a carrier is 
  254.           detected.
  255.         * Built-in chat mode with word-wrap and highlighted user-
  256.           entered text on the local screen.
  257.         * Boolean variable QUIT which is set to TRUE if ALT-H is
  258.           hit from the local keyboard- allows for programmer-defined
  259.           or non-existent "hang-up" procedures.
  260.         * Easy "caps-lock", and "password-entry" (see "***" instead of
  261.           "hey") modes.
  262.         * Length restriction on input fields.
  263.         * Built-in string capitalization and easy integer/longint to
  264.           string conversion.
  265.         * Built-in direct screen write functions.
  266.         * Automatic status bar displaying time, name and baud rate.
  267.         * Automatic handling of user's time.
  268.         * Built-in routines for clearing user's and local screen.
  269.         * Built-in boolean response "Are you sure?" function.
  270.         * Built-in User-Pager.
  271.         * Automatic, disablable "Last Printed" Memory.
  272.         * Help Status Bar on Local Screen.
  273.         * Auto-sensing of color/monochrome mode.
  274.         * Turbo Pascal 5.5 AND 6.0 support.
  275.         * ANSI Support.
  276.         * Ability to change User time    
  277.         * Auto-hangup (QUIT := TRUE) at time<1  (can be disabled).
  278.         * System messages in status bar.
  279.         * Ability to add support for ANY BBS System
  280.         * Ability to be run in multi-tasking environments such as
  281.           DESQVIEW and WINDOWS.
  282.         * Automatic ANSI filter on outgoing text.
  283.         * Local disable/enable of remote user keyboard. 
  284.         * Fake line-noise
  285.         * Ability to use non-standard IRQ/COMM port configurations
  286.         * Ability to change all communications parameters
  287.  
  288.  
  289.  
  290. Triumph Software - TriDoor Documentation                                pg. 003
  291.  
  292.  
  293.  
  294.  
  295.  
  296.                             WHAT'S NEW THIS VERSION
  297.  
  298.  
  299.         * You may now use non-standard COMM port/IRQ settings.  In order
  300.           to do this, all you need do is fill in the appropriate variables
  301.           which have been added to the <stat> record before running the
  302.           setuptri() function.  Note that readquick() will do this
  303.           automatically.
  304.  
  305.           For further discussion on this topic please see the chapters
  306.           entitled INCORPORATING SUPPORT FOR OTHER BBS SOFTWARE and
  307.           ACCESSABLE VARIABLES.
  308.  
  309.         * The readquick() procedure will automatically determine
  310.           parity, stop bits and data bits.
  311.  
  312.  
  313.  
  314.  
  315. Triumph Software - TriDoor Documentation                                pg. 004
  316.  
  317.  
  318.  
  319.  
  320.  
  321.                                COMMAND SUMMARY
  322.  
  323.  
  324.    * NOTE : All  accessable  variables will be discussed  in more detail in
  325.             the Accessable Varibles portion of this document.
  326.  
  327.             All commands marked with a signle * (asterix) are automatically
  328.             executed in the setuptri  procedure or is automatically handled
  329.             by TriDoor under normal operating conditions.
  330.  
  331.  
  332.    <01> function  offline : boolean;
  333.  
  334.         This function will return a TRUE if there is no user "on-line".
  335.         This function automatically accounts for local users.
  336.  
  337.    <02> procedure recordtimeon; *
  338.  
  339.         This procedure records the time  that the user enters the door.
  340.  
  341.    <03> function  timeleft : integer;
  342.  
  343.         The timeleft  function will check  the user's  time left in the
  344.         door. If the boolean variable AUTOHANG is set  to TRUE  and the
  345.         user's time runs  out, the boolean QUIT  variable  will also be 
  346.         set to TRUE.
  347.  
  348.    <04> procedure puttime;
  349.  
  350.         This  procedure will  put the user's  time left  in  the  lower
  351.         righthand  area of  the screen as  long as  the boolean TIMEOFF
  352.         variable is set to false.
  353.  
  354.    <05> function  strg( i : integer ) : string;
  355.  
  356.         This function will return the string of any integer.
  357.  
  358.    <06> function  bstrg( li : longint ) : string;
  359.  
  360.         This function is the same as the strg() function except that it
  361.         will accept long integers as well.
  362.  
  363.    <07> function  ucase( strg : string ) : string;
  364.  
  365.         This  function  will  return  the  string  given it  in capital
  366.         letters.
  367.  
  368.    <08> procedure dwrite( outchr : char; attr : integer );
  369.  
  370.         The dwrite() procedure will write the character outchr directly
  371.         to screen memory at position scrnpos.
  372.  
  373.  
  374.  
  375. Triumph Software - TriDoor Documentation                                pg. 005
  376.  
  377.  
  378.    <09> procedure gotopos( x,y : integer );
  379.  
  380.         The  gotopos()  procedure  will set  the  variable  SCRENPOS in
  381.         accordance to the standard x,y position.
  382.  
  383.    <10> procedure dstr( outstr : string; attr : integer );
  384.  
  385.         This procedure writes a string to screen memory at the position
  386.         of SCRENPOS.
  387.  
  388.    <11> procedure statusbar; *
  389.  
  390.         The statusbar() procedure will print a bar at the bottom of the
  391.         local  screen with  with the  user 's name , time left and baud
  392.         rate.   This is  also  where  the  variable PROGRAMNAME will be 
  393.         displayed.
  394.  
  395.    <12> procedure sysmessage( strng : string );
  396.  
  397.         The sysmessage() procedure will  print a message (strng) in the
  398.         statusbar on the local screen.
  399.  
  400.    <13> function  readquick : boolean;
  401.  
  402.         This   function   will   read  the  necessary   door  operation
  403.         information  from  the door support file DORINFO1.DEF.  TriDoor
  404.         MUST get it's essential information from a door support file in
  405.         order to be able to operate properly.  This  will also return a
  406.         TRUE if the file was successfully read.
  407.  
  408.    <14> function  topcaps( strg : string ) : string;
  409.  
  410.         This  function  will return a  string with the  first letter of
  411.         word capitalized and all other letters in lower-case.
  412.  
  413.    <15> procedure clearcom;
  414.  
  415.         This function will clear the local screen and the remote screen
  416.         if a user is online.
  417.  
  418.    <16> procedure angotoxy( x, y : integer );
  419.  
  420.         This is the ANSI  equivalent of the  Pascal procedure gotoxy().
  421.         If ANSI is disabled, this function will NOT work.
  422.  
  423.    <17> procedure anleft( ls : integer );
  424.  
  425.         This is  an ANSI  procedure that will  move left the  number of
  426.         spaces specified in the variable ls.
  427.  
  428.  
  429.  
  430. Triumph Software - TriDoor Documentation                                pg. 006
  431.  
  432.  
  433.    <18> procedure anright( rs : integer );
  434.  
  435.         This is identical to anleft() except that it goes right instead
  436.         of left.
  437.  
  438.    <19> procedure anup( us : integer );
  439.  
  440.         This procedure is similar to anleft() and anright() except that
  441.         it goes up the number of spaces passed as the variable us.
  442.  
  443.    <20> procedure andown( ds : integer );
  444.  
  445.         This procedure is identical to anup() except  that it goes down
  446.         instead of up.
  447.  
  448.    <21> procedure aneraseln;
  449.  
  450.         This is  the  ANSI procedure  to erase  an  entire line  in the
  451.         current ANSI color as set by ancolor().
  452.  
  453.    <22> procedure anclear;
  454.  
  455.         The  anclear() procedure is the ANSI equivalent of clearing the
  456.         screen.  Like all ANSI  functions and procedures, this does not 
  457.         function if ANSI is disabled.
  458.  
  459.    <23> procedure ancolor( bl, br, fg, bg : integer );
  460.  
  461.         This function will set the ANSI color.  The following constants
  462.         have been provided for easy access :
  463.  
  464.            bl    : BLINK      
  465.  
  466.            br    : INTENSITY
  467.  
  468.            fg/bg : BLACK, RED, GREEN, YELLOW, BLUE, MAGENTA,
  469.                    CYAN, WHITE
  470.  
  471.         The following are some examples :
  472.  
  473.         ancolor(0,0,WHITE,BLACK)           white/black background
  474.         ancolor(BLINK,0,CYAN,BLACK)        blinking cyan/black background
  475.         ancolor(0,INTENSITY,WHITE,BLACK)   bright white/black background
  476.  
  477.    <24> function  getkey : char;
  478.  
  479.         This function will wait for a key to be pressed either locally,
  480.         or over the communications port if a carrier is present.
  481.  
  482.    <25> function  comwait : boolean;
  483.  
  484.         This will tell  you if there  is a  character  waiting  in  the
  485.         input buffer of the communications port waiting to be read.
  486.  
  487.  
  488.  
  489. Triumph Software - TriDoor Documentation                                pg. 007
  490.  
  491.  
  492.    <26> function  getinput( wrdsize : word ) : string;
  493.  
  494.           The  getinput()  function is  similar to getkey() except that
  495.           this  function  allows  for  a  string  to  be  entered.  The 
  496.           following variables also apply :
  497.  
  498.             CAPS := TRUE/FALSE    --  will convert all typed to
  499.                                       uppercase if TRUE.
  500.  
  501.             CODE := TRUE/FALSE    --  will  show all characters
  502.                                       typed as *'s if TRUE.
  503.  
  504.             wrdsize := (1-255)    --  maximum characters accepted
  505.                                       as input.
  506.  
  507.  
  508.    <27> function  readphone : string;
  509.  
  510.         This function reads and returns a phone number in the format of
  511.         (###)###-####.
  512.  
  513.    <28> function  readdate  : string;
  514.  
  515.         This function reads amd returns a date  in the format XX/XX/XX.
  516.  
  517.    <29> procedure printchar( ch : char );
  518.  
  519.         The printchar() procedure will  print a  character to the local
  520.         screen and the comport  if a carrier  is detected.  There is no
  521.         calculated delay  between characters  in this function as there 
  522.         is in the print() procedure.
  523.  
  524.    <30> procedure print( strng : string );
  525.  
  526.         The print() procedure will print a string to  the local screen,
  527.         as well as to the communications port if a carrier is detected.
  528.  
  529.         To create a  carriage return, simply  plug in a  || anywhere in
  530.         the string to be printed.
  531.  
  532.         For example...
  533.  
  534.            print('My name is george.||Who are you?||||BLAH! ');
  535.            would print...
  536.  
  537.              My name is george.
  538.              Who are you?
  539.  
  540.              BLAH! ( <-- cursor would remain here! )
  541.  
  542.  
  543.  
  544. Triumph Software - TriDoor Documentation                                pg. 008
  545.  
  546.  
  547.  
  548.         NOTE : When plugging variables, substitute +'s  where you would
  549.                normally place ,'s in a write()/writeln().
  550.  
  551.         For example...
  552.  
  553.           print('My name is '+mynamevar+'.||');
  554.  
  555.         When printing  Numerical  Variables, use  the STRG  function to
  556.         convert them to a string format.
  557.  
  558.         For example...
  559.  
  560.           print('My age is '+STRG(age)+'.||);      
  561.  
  562.         Also note that as of  V1.26 there is a  boolean variable called
  563.         queueoff.  If   this  variable  is set  to  false,  the print() 
  564.         command  will  always  remember the last  thing printed. (Comes
  565.         in handy when exiting chat-modes and so-forth.)
  566.  
  567.         The  variable  that  the  last thing  printed  is  stored in is
  568.         queueone. (a string)
  569.  
  570.    <31> procedure comprint( strng : string );
  571.  
  572.         The comprint() procedure  is  identical  to print, except  that
  573.         it prints  SOLELY to the communications  port and  that it does
  574.         not have a queue like print does.
  575.  
  576.    <32> function setuptri : boolean;
  577.  
  578.         This  function  MUST  be  run  in  order for TriDoor to operate
  579.         properly.  It  is to be  placed  in  your  program's code right
  580.         after the reading of the chosen door support files.  setuptri()
  581.         will return a FALSE  if it fails  to set  up the communications
  582.         port with the values currently in the STAT record.
  583.  
  584.    <33> function  aysure( s : string; [Yes/No] ) : boolean;
  585.  
  586.         The aysure() function will  print the string s accompanied by a
  587.         '? (Y/[N])' and  return  a boolean TRUE or FALSE depending on a 
  588.         choice of yes or no respectively.
  589.  
  590.         The Yes/No is to specify which choice you would like to have as
  591.         the default setting for if the user hits RETURN.
  592.  
  593.         An example of this is as follows-
  594.  
  595.            if aysure('Proceed to next procedure',Yes) then gonext;
  596.  
  597.  
  598.  
  599. Triumph Software - TriDoor Documentation                                pg. 009
  600.  
  601.  
  602.    <33> procedure showfile( fname : string; len : word );
  603.  
  604.         The showfile()  function will display  a file  to both the user
  605.         on-line (if present) and to the local screen.  The len variable
  606.         is  the  number  of  lines of the  file that  should be printed
  607.         before a 'More? ([Y]/N)' appears.
  608.  
  609.  
  610.  
  611.  
  612. Triumph Software - TriDoor Documentation                                pg. 010
  613.  
  614.  
  615.  
  616.  
  617.  
  618.                            ACCESSIBLE VARIABLES
  619.  
  620.  
  621.      Here is a  list  of accessible variables and  their descriptions.  You
  622.    may  work with these as you  like at  any time during program operation.
  623.  
  624.  
  625.   statrec =               { RECORD OF ON-LINE USER STATISTICS }
  626.     record
  627.       name       : string[50];    { name of user on-line                    }
  628.       baud,                       { baud rate                               }
  629.       time       : word;          { time user has left                      }
  630.       comstr     : string[20];    { comstring in the format 1200,N,8,1      }
  631.       comport    : integer;       { comport- COM1,COM2, etc...              }
  632.  
  633.       comp_interrupt,             { assignable comport IRQ                  }
  634.       comp_dbits,                 { assignable data bits                    }
  635.       comp_sbits,                 { assignable stop bits                    }
  636.       comp_parity  : integer;     { assignable parity                       }
  637.  
  638.       ansi       : boolean;       { ANSI codes enabled if TRUE              }
  639.     end;
  640.  
  641.      
  642.      The above record  is necessary  to support the  various bulletin board
  643.    systems.  This will be further explained in the next section.
  644.  
  645.  
  646.       var
  647.         stats       : statrec;         record of starec
  648.         local,                         local if true
  649.         code,                          "***" at getinput() if true
  650.         quit,                          set to true at ALT-H and timeout
  651.         caps,                          caps at getinput() if true
  652.         queueoff,                      turn off print queue if true
  653.         timeoff,                       display time in status bar if false
  654.         ansi,                          ANSI active if true
  655.         autohang    : boolean;         sets quit to true at time<1 if true
  656.         mainpath,                      path to DORINFO1.DEF  (default=current)
  657.         queueone    : string;          queue store for print queue
  658.         programname : string[80];      name of program (shown in status bar)
  659.  
  660.  
  661.  
  662.  
  663. Triumph Software - TriDoor Documentation                                pg. 011
  664.  
  665.  
  666.  
  667.  
  668.  
  669.                 INCORPORATING SUPPORT FOR OTHER BBS SOFTWARE
  670.  
  671.  
  672.      Due to  the  variety  of  bulletin  board systems  available today  we
  673.    have made TriDoor easily adaptable for any system.  The variables in the
  674.    record STAT  which  is of  the type  STATREC must be  filled in with the 
  675.    data from the door  support file  which you  are reading.  The following
  676.    is an example of how TriDoor reads this data from the  file DORINFO1.DEF
  677.    which is created by QuickBBS and it's clones.
  678.  
  679.     {* * * * * * * * *}
  680.  
  681.     function readquick : boolean;
  682.     
  683.     { reads a users stats from the file DORINFO1.DEF and returns
  684.       false if there was an error.                               }
  685.     
  686.     var
  687.       deffile : text;
  688.       i,
  689.       loop,
  690.       loop2   : integer;
  691.       comst,
  692.       filler  : string;
  693.       work1,
  694.       work2   : string[40];
  695.     
  696.     begin
  697.       if fsearch(mainpath+'DORINFO1.DEF','') <> '' then
  698.         begin
  699.  
  700.           assign(deffile,mainpath+'DORINFO1.DEF');
  701.           reset(deffile);
  702.  
  703.           for loop := 1 to 4 do
  704.             readln(deffile,filler);
  705.  
  706.           case filler[4] of
  707.             '0' : stats.comport := 0;
  708.             '1' : stats.comport := COM1;
  709.             '2' : stats.comport := COM2;
  710.         '3' : stats.comport := COM3;
  711.         '4' : stats.comport := COM4;
  712.           end;
  713.  
  714.           readln(deffile,stats.comstr);
  715.           readln(deffile,filler);
  716.           readln(deffile,work1);
  717.           readln(deffile,work2);
  718.           readln(deffile,filler);
  719.           readln(deffile,i);
  720.           readln(deffile,filler);
  721.           readln(deffile,stats.time);
  722.           close(deffile);
  723.     
  724.  
  725.  
  726. Triumph Software - TriDoor Documentation                                pg. 012
  727.  
  728.  
  729.           stats.name := work1 + ' ' + work2;
  730.     
  731.           work1 := '';
  732.           loop2 := 0;
  733.           loop := length(stats.comstr);
  734.     
  735.           while (loop2<loop) and (ord(stats.comstr[loop2+1]) <> 32) do
  736.             begin
  737.               loop2 := loop2 + 1;
  738.               work1 := work1 + stats.comstr[loop2];
  739.             end;
  740.  
  741.           val(work1,stats.baud,loop);
  742.     
  743.           if i = 1 then stats.ansi := TRUE
  744.             else stats.ansi := FALSE;
  745.     
  746.           i := pos('BAUD',stats.comstr);
  747.           i := i + 5;
  748.     
  749.           work1 := copy(stats.comstr,i,1);
  750.           case work1[1] of
  751.                'N' : stats.comp_parity := NONE;
  752.                'E' : stats.comp_parity := EVEN;
  753.                'O' : stats.comp_parity := ODD;
  754.                'M' : stats.comp_parity := MARK;
  755.                'S' : stats.comp_parity := SPACE;
  756.           end;
  757.     
  758.           val(copy(stats.comstr,i + 3,1),loop,loop2);
  759.           stats.comp_dbits := loop;
  760.           val(copy(stats.comstr,i + 5,1),loop,loop2);
  761.           stats.comp_sbits := loop;
  762.  
  763.           readquick := true;
  764.         end
  765.       else
  766.         readquick := false;
  767.     end;
  768.  
  769.     {* * * * * * * * *}
  770.  
  771.      Once either this  or your customized  function has  been executed and,
  772.    the all  of the <stats> record  variables have  been filled  in all your
  773.    program  needs to  do is execute the  setuptri() function.  Once this is
  774.    done your system should be fully configured and ready to begin efficient
  775.    communications.
  776.  
  777.      PLEASE NOTE that if  you are using non-standard IRQ settings  that you
  778.    will need  to enter  the  IRQ  value into  the  <stats>  BEFORE  running
  779.    setuptri().  Remember that TriDoor has IRQ2-IRQ4 as global constants for
  780.    your convenience.
  781.  
  782.      Please note that if  your BBS software is not supported  and you write
  783.    a procedure  to handle it that  we will  put it  in  future  versions of
  784.    TriDoor if you send it to us.
  785.  
  786.  
  787.  
  788. Triumph Software - TriDoor Documentation                                pg. 013
  789.  
  790.  
  791.  
  792.  
  793.  
  794.                           PROGRAMMING WITH TRIDOOR
  795.  
  796.  
  797.      Creating doors  with TriDoor is  an astoundingly simple  process but a
  798.    couple  steps must  be taken in  each program you write in order for the 
  799.    program to function  normally.  The  computer may  physically  "hang" if 
  800.    these  few following procedures are not completed (but will usually just
  801.    drop out with a complaint about not being able to set-up properly.)
  802.  
  803.      First of all  you must fill in  the STAT  record with  the appropriate
  804.    data  either using procedures  already incorporated in TriDoor or with a
  805.    procedure or  function of  your  own.  The  STAT record  is shown in the
  806.    "Accessable Variables" chapter with it's record type, STATREC.
  807.  
  808.      If your BBS is not  currently supported  by TriDoor  then you  need to
  809.    create  your  own  support  file  which  is  explained  in  the previous
  810.    chapter, "Incorporating Support for Other BBS Software".
  811.  
  812.      Then  you  must call  on the  setuptri() procedure  which  will set up
  813.    the communications port and initialize the system for door support.
  814.  
  815.      After  these  two or  three things have been completed you may proceed
  816.    with using any of TriDoor's commands and features to write your door.
  817.  
  818.      Remember  that due to  the nature of Turbo Pascal's units, any TriDoor
  819.    function or procedure that  you do not use will  not be built  into your
  820.    software.  This is  good for two  reasons- one is  that  memory will not
  821.    be used unecessarily and the other is that you may create substuitutions
  822.    for TriDoor commands that you would prefer to write yourself.
  823.  
  824.  
  825.  
  826. Triumph Software - TriDoor Documentation                                pg. 014
  827.  
  828.  
  829.  
  830.  
  831.  
  832.                                RESERVED WORDS
  833.  
  834.  
  835.      The following list of words are  reserved (used by TriDoor) and not to
  836.    be re-defined  by any program incorporating  TriDoor as  a conflict will 
  837.    arise that will  result  in non-functionality,  to some  degree,  of the 
  838.    final resultant program/software.
  839.  
  840.  
  841.         tridr55?          tridr60?          buffptr          buffrec
  842.         statrec           stats             scrnpos          logontime
  843.         comintvec         screnmode         local            code
  844.         quit              caps              queueoff         buffertop
  845.         head              tail              oldint           exitsave
  846.         programname       tdver             tddate           CR
  847.         BS                BLACK             RED              GREEN
  848.         YELLOW            BLUE              MAGENTA          CYAN
  849.         WHITE             INTENSITY         BLINK            IER
  850.         IIR               LCR               MCR              LSR
  851.         MSR               RLS               RDA              TRE
  852.         MSI               PIC               EOI              PICMASK
  853.         ENABLE1           ENABLE2           DISABLE1         DISABLE2
  854.         BIOSSEG           KEYHEAD           KEYTAIL          EVEN
  855.         ODD               NONE              COM1             COM2
  856.         COM3              COM4              IRQ2             IRQ3
  857.         IRQ4              offline           recordtimeon     timeleft
  858.         puttime           strg              bstrg            ucase
  859.         dwrite            gotopos           dstr             statusbar
  860.         sysmessage        readquick         clearcom         angotoxy
  861.         anleft            anright           anup             andown
  862.         aneraseln         anclear           ancolor          getkey
  863.         comwait           getinput          readphone        readdate
  864.         printchar         print             comprint         checkkey
  865.         setuptri          aysure            Yes              No
  866.  
  867.  
  868.    
  869. Triumph Software - TriDoor Documentation                                pg. 015
  870.  
  871.  
  872.  
  873.  
  874.  
  875.                           TESTED LIMITS OF TRIDOOR
  876.  
  877.  
  878.      TriDoor has been run and tested, successfully, on a variety of systems
  879.    ranging from a 4.77MHz IBM XT with a 2400 baud modem to a 33MHz 386 with
  880.    a 9600 baud HST modem.  As far as we know, if your system is fast enough
  881.    to handle your modem, this unit will function without a hitch.
  882.  
  883.      There  are a  few limitations, however, that  we are  aware of at this
  884.    time.  The constraints are as follows :
  885.  
  886.  
  887.       *** There are currently no limits on TriDoor that we know of ***
  888.  
  889.  
  890.      Those are all of them as far as we are aware.  If you find any new 
  891.    problems, please contact us immediately.
  892.  
  893.  
  894.  
  895.  
  896.  
  897. Triumph Software - TriDoor Documentation                                pg. 016
  898.  
  899.  
  900.  
  901.  
  902.  
  903.                             PROGRAMMING HINT(S)
  904.  
  905.  
  906.      Here  are a  few  ideas  to  get you  going.  TriDoor  is written very
  907.   flexibly to allow for you to do essentially as you like with the commands
  908.   However,  due  to  this flexibility, some things may  seem  confusing, or 
  909.   just not  occur to you right away. Over time, as I think of these things,
  910.   I will place them in this area, and  feel free to send  us any hints that
  911.   you've discovered while programming with TriDoor.
  912.  
  913.       * REMEMBER to  put online and quit  checks in all  of your while
  914.         loops and repeat untils and so on.  If you do not put these in
  915.         and you hit ALT-H or the user drops  carrier then your program 
  916.         will hang!
  917.  
  918.       * Program all of your door support file reading functions with a
  919.         boolean return.  This  not only  allows you to  know if it was
  920.         successful but will also allow you to program a procedure that
  921.         automatically reads whatever door support file is available.
  922.  
  923.       * Do you want the SysOp to see something that the user will not?
  924.         Simply  use  a writeln()  instead  of  print().  Or  in  newer
  925.         versions  of  TriDoor, use the  sysmessage()  command.  It  is 
  926.         always good to make it  obvious to  the SysOp that the user is
  927.         not seeing that text, though!  A standard way of doing this is
  928.         by using a  small block  (ASCII 254) before the text and high-
  929.         lighting it.
  930.  
  931.       * Try not to exclude non-ANSI users from your door.  It's a sign
  932.         of a lazy/unthinking programmer.  Better than 35% of BBS users
  933.         DO NOT have ANSI capabilities- don not limit yourself and your
  934.         program!
  935.  
  936.       * Remember that many  bulletin board systems  run better if they
  937.         stay in memory  while dropping to dos  to run a door, and many
  938.         systems  do not have more  than 640k-1 meg  of RAM.   If  your
  939.         program  requires more, try to  break it up into pieces to run
  940.         more efficiently.  If you  have an  update program  that needs
  941.         to be run but once per day, make it a separate one.
  942.  
  943.  
  944.  
  945. Triumph Software - TriDoor Documentation                                pg. 017
  946.  
  947.  
  948.  
  949.  
  950.  
  951.                      THINGS TO COME ("THE WORKBENCH")
  952.  
  953.  
  954.      The  following is  a list of some  of the things that  are most likely
  955.    going to be  added in future  versions  of this  software.  Or  they are
  956.    things that we are,  at the very least,  seriously  considering. This is
  957.    a far from complete list, but it gives you an idea of what we are up to.
  958.    If you have any further ideas or suggestions, please contact us and tell
  959.    us what you think.
  960.  
  961.  
  962.              * Support for other BBS software such as PCBoard
  963.  
  964.                (If you have a system you would like supported, send us
  965.                 the appropriate file and information so we may add it.)
  966.  
  967.  
  968.  
  969. Triumph Software - TriDoor Documentation                                pg. 018
  970.  
  971.  
  972.  
  973.  
  974.  
  975.                                 WHO TO CONTACT
  976.  
  977.  
  978.      Did  your machine swear in protest  at our software?  Are  you missing
  979.    files  that  should  be  included  in this  release?  Do  you have   any 
  980.    questions  you  would  like  to  ask  us?  Do  you  have any comments or
  981.    suggestions?
  982.  
  983.      Well, then- you  may  get  in contact with us  at any of the following
  984.    places/numbers :
  985.  
  986.  
  987.  
  988.             Christopher M. Russo          Voice : (508)263-8420
  989.             Jeremy H. DuBois              Voice : (508)263-7004
  990.  
  991.             Triumph BBS                   TEMPORARILY OFF-LINE
  992.                                           PLEASE CALL VOICE
  993.  
  994.  
  995.      Remember  that those voice  phones are our  HOME phones as  we do  not
  996.    yet have a business line- please  refrain from hassling the other people
  997.    that live there-  NONE of  us will answer "Hello, Triumph Software."  We
  998.    will tell you when we get the business line.
  999.  
  1000.      We are  also looking out for potential support boards and beta-testing
  1001.    systems, so if  you  have  a system  and are  interested, make sure  you 
  1002.    inform us of your desire and eligibility.
  1003.  
  1004.  
  1005.  
  1006.  
  1007.  
  1008. Triumph Software - TriDoor Documentation                                pg. 019
  1009.  
  1010.  
  1011.  
  1012.  
  1013.  
  1014.                              HISTORY OF TRIDOOR
  1015.  
  1016.  
  1017.      TriDoor and  it's  communications support is the  end result of almost
  1018.    four  years  of  effort by  both Jeremy DuBois  and myself. (Christopher
  1019.    M. Russo)  We  started one rainy  day when Jeremy  had  informed me that
  1020.    he had  managed to  write   some  basic  polling  Pascal  communications 
  1021.    routines.  As  Jeremy already  had a  bulletin  board  system running at
  1022.    that time, I suggested that we write an on-line game for it.
  1023.  
  1024.      And that  is when it all began.  We went from  writing a semi-complete
  1025.    and not-too-awful  on-line game  to writing DoorBase,  our first version
  1026.    of an  on-line  door  supporting  unit.  Then  I wrote a game on my own-
  1027.    Monopolistic  Competition,  followed shortly  thereafter by Monopolistic
  1028.    Competition II which was running off  of a  newer, but  still bedraggled
  1029.    version of DoorBase.
  1030.  
  1031.      Then one  day while  trying to write  a terminal program,  we realized
  1032.    that the  communications routines  that Jeremy had  made were simply not
  1033.    fast enough  to  handle all  the  tasking  necessary,  and  at  anything
  1034.    above  2400 baud, was  a miserable failure.  Thus,  Jeremy set  out once
  1035.    again to create newer, faster, interrupt driven routines.
  1036.  
  1037.      I had  quite  a lot  of trouble  dealing with  the  newer routines for
  1038.    reasons  which,  I  admit,  are  beyond  my  knowledge.  After time  and
  1039.    perseverance,  however,  I mastered  the  new  routines and re-wrote the
  1040.    newest version of DoorBase,  now  called TriDoor  in the interest of our
  1041.    newly-founded company.
  1042.  
  1043.      And thus,  I present  to you  said software and complete documentation
  1044.    for the easy usage  and incorporation of  communication and door support
  1045.    in your Pascal programs for QuickBBS and clones. I strongly believe that  
  1046.    using TriDoor is the easiest, most  user-friendly  way  of writing doors  
  1047.    and on-line games available today.
  1048.  
  1049.      Finally, before  we  commence, I would like  to take a moment to thank
  1050.    Jeremy for  all his help and  patience with my  quirky little habits and
  1051.    programming nit-picks.  I  have never  given  another  teacher more of a 
  1052.    hard time than I  gave him.  Ridiculous  as  this  may sound, he  is  an
  1053.    inspiration  to me,  and I  thank him  for all he's taught me and all he
  1054.    will, undoubtedly, teach me in the future.
  1055.  
  1056.  
  1057.  
  1058.  
  1059. Triumph Software - TriDoor Documentation                                pg. 020
  1060.  
  1061.  
  1062.  
  1063.  
  1064.  
  1065.                     OTHER PRODUCTS BY TRIUMPH SOFTWARE
  1066.  
  1067.  
  1068.      The  following  products  are  also  available from  Triumph Software.
  1069.    For  more information on these products or specific consulting services,
  1070.    please contact us.
  1071.  
  1072.  
  1073.        TriComm . . . . . . . . . . . . . . . . . . . .Registered : $30
  1074.  
  1075.           TriComm is the original communications unit compiled for
  1076.           Turbo Pascal 5.5 and used in the creation of TriDoor. It
  1077.           currently  supports COM1 and  COM2 and  runs at all baud
  1078.           rates.  (Has been tested up to and over 9600 baud)
  1079.  
  1080.  
  1081.        TriUser . . . . . . . . . . . . . . . . . . . .Registered : $25
  1082.  
  1083.           TriUser is an on-line QuickBBS user editor written using
  1084.           the TriDoor  on-Line  door support  unit.  It also takes
  1085.           advantage of TriDoor's ANSI support features.
  1086.  
  1087.  
  1088.        WorldFix. . . . . . . . . . . . . . . . . . . . . . . . $200.00
  1089.  
  1090.           WorldFix  is  a  utility  for  the Real  World Accounting
  1091.           software package that  will close data  files in a matter
  1092.           of seconds  as opposed to  the minutes and  hours that it
  1093.           takes Real World to  do the same  job.  Triumph  Software
  1094.           and Real World are not aphilliated in any way.
  1095.  
  1096.  
  1097.        Qstat . . . . . . . . . . . . . . . . . . . . .Registered : $20
  1098.  
  1099.           Qstat  is a  QuickBBS  download  counter  that  will keep
  1100.           track of  downloads in  the  FILES.BBS files.  Among it's
  1101.           many nice  features are a limit of 999 downloads per file
  1102.           before returning to 0, (Most such programs only allow 99)
  1103.           a nice interface and display and an error log.
  1104.  
  1105.  
  1106.  
  1107. Triumph Software - TriDoor Documentation                                pg. 021
  1108.  
  1109.  
  1110.  
  1111.  
  1112.  
  1113.                            A COMMENT ON QUALITY
  1114.  
  1115.  
  1116.      To finalize,  I would  like to take  a moment to voice  my thoughts on
  1117.    quality in programs and programming.
  1118.  
  1119.      I  have spent  over eight  years working  on and  with bulletin  board
  1120.    systems,  an equal  amount  of time  programming both  at an amateur and
  1121.    a professional level,  and three years or  more programming for bulletin 
  1122.    board systems.
  1123.  
  1124.      In that time I  have seen many  doors and many bulletin board systems,
  1125.    and  I have noticed so many sloppy doors and on-line games that if I had
  1126.    a computer for every  one I have ever seen,  I would be able to put them 
  1127.    together and  form a top-of-the-line Sun SPARCStation with tint-control,
  1128.    a built-in microwave and a television.
  1129.  
  1130.      I can't  tell you how many  times I have run  a program  and then been
  1131.    asked,  infuriatingly, "Cannot  find  BRUNxx.EXE.  New  Path?" or  found 
  1132.    that a program would literally crash inside of two  minutes of operation
  1133.    on any machine that I could try it on. 
  1134.  
  1135.      And  all the programs  that I  saw grinding  away at the disk-drive as
  1136.    they  either accessed a massive load of disorganized data or simply were 
  1137.    running in the  slowest possible languages and needed three days to load 
  1138.    360k of marginally organized data.
  1139.  
  1140.      Then  there were the programs  that simply crashed  without a peep, or
  1141.    crashed and  threw some  sickening statement  like "KILLROY DEATH NOTICE
  1142.    #093284AF84UAREDEAD" at you as you sat in bewilderment.
  1143.  
  1144.      I am  the pickiest person on  earth when  it comes  to programming, so
  1145.    you can be  assured  that any  product that  you ever  get  from Triumph
  1146.    Software  has been  brutally  criticized  and abused  to make sure it is
  1147.    doing everything it should be doing, doing it well, and then some.
  1148.  
  1149.      If  I missed  something, I will be  ever amazed, but I assure you that
  1150.    I literally don't sleep until the problem is fixed. 
  1151.  
  1152.      I hope  you enjoy  this and all of our programs and  find them easy to
  1153.    use and  well-written.  If you  have  suggestions or  complaints, please
  1154.    contact  us/me as  we/I  are/am always  happy  to hear  them  and try to
  1155.    incorporate them.
  1156.  
  1157.  
  1158.                                 Happy Programming!
  1159.  
  1160.                                  -Christopher M. Russo
  1161.  
  1162.  
  1163. Triumph Software - TriDoor Documentation                                pg. 022
  1164.  
  1165.  
  1166.  
  1167.  
  1168.  
  1169.                ACCEPTABLE CREDIT IN PROGRAMS AND DOCUMENTATION
  1170.  
  1171.  
  1172.      On  the title-page  of  your documentation  where  your  program  name
  1173.    appears, or if  you do  not have such  a page,  wherever your  "credits"
  1174.    are (Written by... ) you should include the following :
  1175.  
  1176.  
  1177.                 TriDoor Communications and On-line Door Driver
  1178.              Written by Christopher M. Russo and Jeremy H. DuBois
  1179.                 (c)1992 Triumph Software, All Rights Reserved.
  1180.                        (508)263-7004 / (508)263-8420
  1181.  
  1182.  
  1183.      The  above listed  credit lines  MUST be  placed within  the  first  3
  1184.    (three)  pages  of  your documentation  to  be considered  as acceptable
  1185.    credit.  A disclaimer  must also  be in the  documentation  stating that
  1186.    Triumph Software is not affiliated with  you or  your company in any way
  1187.    and that Triumph  Software  can not be held responsible for any programs
  1188.    created using the TriDoor package.
  1189.  
  1190.      If no documentation is included in the package that you have produced,
  1191.    then a file giving Triumph Software credit for TriDoor  must be included
  1192.    in the package.  This  credit must also include  the disclaimer as noted  
  1193.    in the previous paragraph.
  1194.  
  1195.      Triumph Software reserves the right to temporarily revoke registration
  1196.    privelleges  until  proper credit  for Triumph Software  is given in any 
  1197.    software/programs created using the TriDoor unit.
  1198.  
  1199.      The following lines will AUTOMATICALLY appear VERY BRIEFLY upon bootup
  1200.    of any program using a registered copy of TriDoor :
  1201.  
  1202.  
  1203.            TriDoor Vx.xx - On-line Door and Communications Support 
  1204.            (c)1992 by Triumph Software, All Rights Reserved.
  1205.            Reg No : xxxxxxxxxx  Reg To : John Q. Programmer
  1206.  
  1207.  
  1208.      A special copy of the  package without this notice may  be obtained by
  1209.    special   arrangements   with  Triumph  Software.  Different   licensing 
  1210.    agreements and disclaimers may apply.
  1211.  
  1212.      Removal of  this notice  or any of it's  information without prior and
  1213.    valid  written  approval by  Triumph Software voids  the registration of
  1214.    the TriDoor package. 
  1215.  
  1216.  
  1217.